package com.shishi.fast.generator.controller;

import com.shishi.fast.common.vo.ResponseListUtils;
import com.shishi.fast.generator.domain.CompanyDO;
import com.shishi.fast.generator.service.CompanyService;
import com.shishi.fast.generator.vo.CompanyRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("company")
public class CompanyController {

    @Autowired
    private CompanyService companyService;

    @GetMapping("list")
    public ResponseListUtils<CompanyDO> list(@Valid CompanyRequest.QueryParam param) {
        return companyService.list(param);
    }

}